<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>中国电信满屏移动飞翔的小广告</title>
		<style type="text/css">
			*{
				margin: 0;
				padding: 0;
			}
			#box{
				width: 1349px;
				height: 665px;
				background: url(img/img189/t1891.jpg);
				position: relative;
			}
			#gg{
				width: 180px;
				height: 210px;
				background: url(img/img189/cjpc.png);
				position: absolute;
				top: 455px;
				left: 50px;
			}
		</style>
	</head>
	<body>
		<div id="box">
			<div id="gg">
				
			</div>
		</div>
	</body>
</html>
<script type="text/javascript">
	var box=document.getElementById("box");
	var gg=document.getElementById("gg");
	var speedx=1;
	var speedy=1;
	var timer=setInterval(function(){
		gg.style.left=gg.offsetLeft-speedx+"px";
		gg.style.top=gg.offsetTop-speedy+"px";
		if (gg.offsetLeft<=0||gg.offsetLeft>=1169) {
			speedx*=-1;
		}
		if (gg.offsetTop<=0||gg.offsetTop>=455) {
			speedy*=-1;
		}
	},20);
	
	
	gg.onmouseover=function(){
		clearInterval(timer);
	}
	
	gg.onclick=function(){
		clearInterval(timer);
		gg.style.display="none";
	}
	
	gg.onmouseout=function(){
		timer=setInterval(function(){
			gg.style.left=gg.offsetLeft-speedx+"px";
			gg.style.top=gg.offsetTop-speedy+"px";
			if (gg.offsetLeft<=0||gg.offsetLeft>=1169) {
				speedx*=-1;
			}
			if (gg.offsetTop<=0||gg.offsetTop>=455) {
				speedy*=-1;
			}
		},20);
	}
</script>
